﻿<%@ Page language="c#" Codebehind="Credit_list.aspx.cs" AutoEventWireup="false" Inherits="zsproject.page.Credit_list" %> 
<%@ Import Namespace="eap.share" %>
<%@ Import Namespace="zsproject.page" %>
<%
	//---------------------------------------------------------------//
	string page=Req.getPara(Request,"page");
	string mainPage=Sys.fieldGet(page,1,"_");
	string actionPage=Sys.fieldGet(page,1,"_")+"_action";
	string SCRIPT_NAME=AdminLib.getSimpleRequestURL(Request);
	AdminUser user = (AdminUser)Session["_user"];

	string actlist=(string)output["actlist"];
	int pageRowNum = 20;
	int pageNum = 1;
	if(Req.getPara(Request,"n") != "")
	{
	  pageNum = Convert.ToInt32(Req.getPara(Request,"n").Trim());
	  pageRowNum = Convert.ToInt32(((AdminUser)Session["_user"])["cfg_list"]);      
	}
	//---------------------------------------------------------------//

	string t=Req.getPara(Request,"t");
	string WEB_PAGE =Request.Url.ToString().Replace("&",",");
	string l=Req.getPara(Request,"l");
	string p=Req.getPara(Request,"p");
	string a=Req.getPara(Request,"a"); 
	string tt=Req.getPara(Request,"tt"); 
	string group_id=Req.getPara(Request,"group_id"); 
	//查询属于下属
	if(group_id=="")
	{
		//查询所有管辖区域的企业
		group_id= user["dept_id"];
	}
	
	string method=Req.getPara(Request,"method");
	string method_name=Req.getPara(Request,"method_name");
%>
<html>
<head>
<title><%=AdminLib.STR_TITLE%></title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
<meta http-equiv='Content-Type' content='text/html; charset=gbk'>
<link rel='stylesheet' href='<%=user.getSkinPath()%>css/eap.css'>
<script language='javascript' src='..<%=AdminLib.EAP_PATH%>/eap.js'></script>
<link rel='stylesheet' href='../skin/zsproject.css'>
<script language='javascript' src='../skin/zsproject.js'></script>
<script charset="UTF-8" src="../tools/kindeditor-4.1.5/kindeditor.js"></script>
<script language='javascript' src="../skin/validation.js"></script>
<script language="javascript" type="text/javascript" src="../tools/My97DatePicker/WdatePicker.js"></script>

<style type="text/css" >
.formitem{background-color: #CBCBCC;}
.formitem th{height:22px; background-color:#E0F1FB;padding-left:3px;text-align:right;}
.formitem td{padding:3px;background-color:#ffffff; line-height:20px;}
</style>

</head>
<!-------------------------------------------框架-------------------------------------->
<%if(t.IndexOf("frame")!=-1){%>
<frameset cols="180,*" frameborder="0" border="0" framespacing="0">
	<frame name="tree" src="../page/tree.aspx?page=<%=t%>&tt=<%=tt%>&l=<%=l%>&p=<%=p%>&a=<%=a%>&f=<%=WEB_PAGE.Replace(t,"")%>" frameborder=yes>
	<frame name="right" src="../page/firm.aspx?page=List&method=<%=method%>" frameborder=yes>
</frameset>
<%return;}%>
<!-------------------------------------------框架-------------------------------------->
<body class="bodyframe" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">  
<!--#INCLUDE FILE="../epass/verify.aspx"-->
 
<%//信息管理
 if(page=="List"){
   string search_title =(string)output["search_title"];
   System.Data.DataRowCollection list=(System.Data.DataRowCollection)output["list"];
   AdminList lst=(AdminList)output["lst"];
%>

<table class="linetitle" border="0" width="100%" cellspacing="0" cellpadding="1">
<tr>
   <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="pagetoobar">
         <tr  height="26">
            <td><strong>&nbsp;&nbsp;企业列表</strong></td>
            <td align="right" style="display:none"><input class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'" id="btn_new" type="button" value="新增"  onclick="window.document.location.href='<%=SCRIPT_NAME%>?page=Form&method=edit';"></td>
         </tr>
      </table>
   </td>
</tr>
</table>

<table class=tbsearch border=0 width=100% cellspacing=0 cellpadding=1 style="">
<form name=frmMain method="get" action="<%=lst.getQryURL()%>"><%=lst.getQryURL2()%>
<tr><td>
关键字查询<input type=text size=30 maxlength=151 name="k" value="<%=lst.getKey()%>">
<input type=submit class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'" value="查询" title="<%=search_title%>"> 
</td></tr>
</form>
</table>

<table class="tbsearch" border="0" width="100%" cellspacing="0" cellpadding="1">
	<tr>
		<td>
			<nolayer>
				<iframe name="_action" height="16" width="100%" marginwidth="0" marginheight="0" scrolling="no"
					frameborder="0" src='../admin/office.aspx?page=_action'></iframe>
			</nolayer>
		</td>
	</tr>
</table>
<script type='text/javascript'>popup_path='../admin/popup.aspx';</script>
 
<fieldset class="tfieldset" >

	<legend>
	<table width="100%" cellpadding="0" cellspacing="0">
	   <tr><td class="title"><span>&nbsp;信息列表</span></td> 
	   <td align="right"><span>
		 <input class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'" id="btn_new" type="button" value="新增"  onclick="window.document.location.href='<%=SCRIPT_NAME+"?page=Form&method=edit&group_id="+group_id%>'">
		<input type=button value="删除" title="删除上述选中的记录" class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'" onClick="confirmdel_var(frmg)">
	</span></td></tr>
	</table>
	</legend>

	<div id="tbl-container" style="height:340px">
		<table id="datagrid" border="0" width="100%" cellPadding=0 cellSpacing="0" bgcolor="#99ccff">
			<form  method="POST" action="<%=SCRIPT_NAME+"?page="+actionPage%>" target=_action id="frmg" name="frmg">
			<thead>
				<tr class=linetitle align=center>    
					<th><input type="checkbox" name="chkall" value="on" onClick="checkall(this.form)"  title="全选(删除)"></th>
					<th nowrap><%=lst.getOrder(user,"id","ID","序号")%></th>
					<th nowrap>操作</th>
					<!--------获取标题-------->
					<th nowrap><%=lst.getOrder(user,"name","name","姓名")%></th>
					<th nowrap><%=lst.getOrder(user,"sex","sex","性别")%></th>
					<th nowrap><%=lst.getOrder(user,"birthday","birthday","出生年月")%></th>
					<th nowrap><%=lst.getOrder(user,"national","national","民族")%></th>
					<th nowrap><%=lst.getOrder(user,"birthplace","birthplace","籍贯")%></th>
					<th nowrap><%=lst.getOrder(user,"cred","cred","身份证号")%></th>
					<th nowrap><%=lst.getOrder(user,"political","political","政治面貌")%></th>
					<th nowrap><%=lst.getOrder(user,"phone","phone","联系电话")%></th>
					<th nowrap><%=lst.getOrder(user,"address","address","通讯地址")%></th>
					<th nowrap><%=lst.getOrder(user,"postcode","postcode","邮政编码")%></th>
					<th nowrap><%=lst.getOrder(user,"picture","picture","照片")%></th>
					<th nowrap><%=lst.getOrder(user,"province","province","户籍所在地（省）")%></th>
					<th nowrap><%=lst.getOrder(user,"city","city","户籍所在地（市）")%></th>
					<th nowrap><%=lst.getOrder(user,"counties","counties","户籍所在地（县区）")%></th>
					<th nowrap><%=lst.getOrder(user,"graduate","graduate","院校")%></th>
					<th nowrap><%=lst.getOrder(user,"grade","grade","所在年级")%></th>
					<th nowrap><%=lst.getOrder(user,"class","class","所在班级")%></th>
					<th nowrap><%=lst.getOrder(user,"professional","professional","所学专业")%></th>
					<th nowrap><%=lst.getOrder(user,"education","education","学历（数据字典：大专、大学、硕士、博士等）")%></th>
					<th nowrap><%=lst.getOrder(user,"requested_amount","requested_amount","申请金额")%></th>
					<th nowrap><%=lst.getOrder(user,"rank","rank","等级")%></th>
					<th nowrap><%=lst.getOrder(user,"approve_amount","approve_amount","奖学金金额")%></th>
					<th nowrap><%=lst.getOrder(user,"approve_time","approve_time","批准时间")%></th>
					<th nowrap><%=lst.getOrder(user,"state","state","状态")%></th>
					<th nowrap><%=lst.getOrder(user,"accessory_ids","accessory_ids","附件id")%></th>
					<th nowrap><%=lst.getOrder(user,"add_time","add_time","添加时间")%></th>
					<th nowrap><%=lst.getOrder(user,"add_user","add_user","添加用户")%></th>
				</tr>
			</thead>
			
			<tbody>	
				<%for(int index=0;list!=null&&index<list.Count;index++){
					System.Data.DataRow map=list[index];
					string id=map["id"].ToString();
				%>
				<tr align=center class=<%if(index % 2 ==1){%>datalineone<%}else{%>datalineone<%}%> onmouseover="dataline_over(this)" onmouseout="dataline_out(this)" onclick="dataline_click(this)">    
					<td nowrap width=60px><input type="checkbox" name="chk_id" id="chk_id" value="<%=map["id"]%>" title="选择(删除)"></td>
					<td nowrap width=60px><%=index+1+(pageNum-1)*pageRowNum%></td>
					<td nowrap width="60px"><input type="button" class="ButtonCss" value="编辑" onclick="window.location.href='<%=SCRIPT_NAME+"?page=Form&method="+method+"&d="+id%>'"></td>
					<!--------获取信息-------->
					<td nowrap align="center"><%=map["name"].ToString()%></td>
					<td nowrap align="center"><%=map["sex"].ToString()%></td>
					<td nowrap align="center"><%=map["birthday"].ToString()%></td>
					<td nowrap align="center"><%=map["national"].ToString()%></td>
					<td nowrap align="center"><%=map["birthplace"].ToString()%></td>
					<td nowrap align="center"><%=map["cred"].ToString()%></td>
					<td nowrap align="center"><%=map["political"].ToString()%></td>
					<td nowrap align="center"><%=map["phone"].ToString()%></td>
					<td nowrap align="center"><%=map["address"].ToString()%></td>
					<td nowrap align="center"><%=map["postcode"].ToString()%></td>
					<td nowrap align="center"><%=map["picture"].ToString()%></td>
					<td nowrap align="center"><%=map["province"].ToString()%></td>
					<td nowrap align="center"><%=map["city"].ToString()%></td>
					<td nowrap align="center"><%=map["counties"].ToString()%></td>
					<td nowrap align="center"><%=map["graduate"].ToString()%></td>
					<td nowrap align="center"><%=map["grade"].ToString()%></td>
					<td nowrap align="center"><%=map["class"].ToString()%></td>
					<td nowrap align="center"><%=map["professional"].ToString()%></td>
					<td nowrap align="center"><%=map["education"].ToString()%></td>
					<td nowrap align="center"><%=map["requested_amount"].ToString()%></td>
					<td nowrap align="center"><%=map["rank"].ToString()%></td>
					<td nowrap align="center"><%=map["approve_amount"].ToString()%></td>
					<td nowrap align="center"><%=map["approve_time"].ToString()%></td>
					<td nowrap align="center"><%=map["state"].ToString()%></td>
					<td nowrap align="center"><%=map["accessory_ids"].ToString()%></td>
					<td nowrap align="center"><%=map["add_time"].ToString()%></td>
					<td nowrap align="center"><%=map["add_user"].ToString()%></td>
				</tr>
				<%}%>
				<tr class=lineaction style="display:none">
				<td colspan=14 align="left">
				<input type=hidden name=action value="delete">
				<input type=hidden name=d value="">
				<input type=hidden name=reload value="">
				<input type=button value="删除" title="删除上述选中的记录" class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'" onClick="javascript:if(confirm_selected(this.form)){ action.value='delete'; reload.value='reload'; submit(); }">
				</td>
				</tr>
				
			</tbody>
			</form>
		</table>
	</div>
</fieldset>

<table width=100% cellspacing=0 cellpadding=1>
	<tr height=22 align=right>
		<td align="center"> <script>if(document.getElementById("dataGrid").rows.length<=2){document.write("<font color='#ff0000'>查询无结果</font>");}</script></td>
		<td><%=lst.getPageBar()%>页码<%=lst.getPageList()%></td>
	</tr>
</table>
<%}%>

<%
//新增修改页面
if(page=="Form"){
	string edit="";
	System.Data.DataRow map=(System.Data.DataRow)output["map"];
	System.Data.DataRow mapList=(System.Data.DataRow)output["mapList"];
	System.Data.DataRowCollection listAtt=(System.Data.DataRowCollection)output["listAtt"];

	string d=Req.getPara(Request,"d");
	string id=d;
	//定义除了主键以外的字段
	string name="";
	string sex="";
	string birthday="";
	string national="";
	string birthplace="";
	string cred="";
	string political="";
	string phone="";
	string address="";
	string postcode="";
	string picture="";
	string province="";
	string city="";
	string counties="";
	string graduate="";
	string grade="";
	string class="";
	string professional="";
	string education="";
	string requested_amount="";
	string rank="";
	string approve_amount="";
	string approve_time="";
	string state="";
	string accessory_ids="";
	string add_time="";
	string add_user="";
	if(map!=null)
	{
		//获取数据库信息
		id=map["id"].ToString();
		name=map["name"].ToString();
		sex=map["sex"].ToString();
		birthday=map["birthday"].ToString();
		national=map["national"].ToString();
		birthplace=map["birthplace"].ToString();
		cred=map["cred"].ToString();
		political=map["political"].ToString();
		phone=map["phone"].ToString();
		address=map["address"].ToString();
		postcode=map["postcode"].ToString();
		picture=map["picture"].ToString();
		province=map["province"].ToString();
		city=map["city"].ToString();
		counties=map["counties"].ToString();
		graduate=map["graduate"].ToString();
		grade=map["grade"].ToString();
		class=map["class"].ToString();
		professional=map["professional"].ToString();
		education=map["education"].ToString();
		requested_amount=map["requested_amount"].ToString();
		rank=map["rank"].ToString();
		approve_amount=map["approve_amount"].ToString();
		approve_time=map["approve_time"].ToString();
		state=map["state"].ToString();
		accessory_ids=map["accessory_ids"].ToString();
		add_time=map["add_time"].ToString();
		add_user=map["add_user"].ToString();

	}else
	{
		//新增,默认值
	}
%>

<table class="linetitle" border="0" width="100%" cellspacing="0" cellpadding="1">
<tr>
   <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="pagetoobar">
         <tr height="26">
            <td><strong>&nbsp;&nbsp;企业信息</strong></td>
         </tr>
      </table>
   </td>
</tr>
</table>

<%=AdminLib.getIframe()%>'

<table id="" class="formitem" cellspacing="1" cellpadding="0" align="center" border="0" style="background-color:#7F96BE;border-width:0px;width:100%; margin-top:5px">
<form id="frmMain"  name=frmMain method=post target="_action" enctype="multipart/form-data" action="<%=SCRIPT_NAME+"?page="+actionPage+"&d="+id%>">
	<tbody>
		<!--------获取控件--------->
		<tr>
			<th align="right">自增id：</th>
			<td>
				<input type="hidden" id="id" name="id" value="<%=id%>"><%=id%>
			</td>
		</tr>
		<tr>
			<th align="right">姓名：</th>
			<td>
				<input type="text" id="name" name="name" value="<%=name%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">性别：</th>
			<td>
				<input type="text" id="sex" name="sex" value="<%=sex%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">出生年月：</th>
			<td>
				<input type="text" id="birthday" name="birthday" value="<%=birthday%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">民族：</th>
			<td>
				<input type="text" id="national" name="national" value="<%=national%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">籍贯：</th>
			<td>
				<input type="text" id="birthplace" name="birthplace" value="<%=birthplace%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">身份证号：</th>
			<td>
				<input type="text" id="cred" name="cred" value="<%=cred%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">政治面貌：</th>
			<td>
				<input type="text" id="political" name="political" value="<%=political%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">联系电话：</th>
			<td>
				<input type="text" id="phone" name="phone" value="<%=phone%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">通讯地址：</th>
			<td>
				<input type="text" id="address" name="address" value="<%=address%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">邮政编码：</th>
			<td>
				<input type="text" id="postcode" name="postcode" value="<%=postcode%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">照片：</th>
			<td>
				<input type="text" id="picture" name="picture" value="<%=picture%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">户籍所在地（省）：</th>
			<td>
				<input type="text" id="province" name="province" value="<%=province%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">户籍所在地（市）：</th>
			<td>
				<input type="text" id="city" name="city" value="<%=city%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">户籍所在地（县区）：</th>
			<td>
				<input type="text" id="counties" name="counties" value="<%=counties%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">院校：</th>
			<td>
				<input type="text" id="graduate" name="graduate" value="<%=graduate%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">所在年级：</th>
			<td>
				<input type="text" id="grade" name="grade" value="<%=grade%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">所在班级：</th>
			<td>
				<input type="text" id="class" name="class" value="<%=class%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">所学专业：</th>
			<td>
				<input type="text" id="professional" name="professional" value="<%=professional%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">学历（数据字典：大专、大学、硕士、博士等）：</th>
			<td>
				<input type="text" id="education" name="education" value="<%=education%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">申请金额：</th>
			<td>
				<input type="text" id="requested_amount" name="requested_amount" value="<%=requested_amount%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">等级：</th>
			<td>
				<input type="text" id="rank" name="rank" value="<%=rank%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">奖学金金额：</th>
			<td>
				<input type="text" id="approve_amount" name="approve_amount" value="<%=approve_amount%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">批准时间：</th>
			<td>
				<input type="text" id="approve_time" name="approve_time" value="<%=approve_time%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">状态：</th>
			<td>
				<input type="text" id="state" name="state" value="<%=state%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">附件id：</th>
			<td>
				<input type="text" id="accessory_ids" name="accessory_ids" value="<%=accessory_ids%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">添加时间：</th>
			<td>
				<input type="text" id="add_time" name="add_time" value="<%=add_time%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<th align="right">添加用户：</th>
			<td>
				<input type="text" id="add_user" name="add_user" value="<%=add_user%>" <%=edit%> style="WIDTH: 100%; TEXT-ALIGN: left;TEXT-VALIGN:middle">
			</td>
		</tr>
		<tr>
			<td width="10%"></td>
			<td width="40%"></td>
			<td width="10%"></td>
			<td width="40%"></td>
		</tr>
	
		<!-------------------------------------------------附件操作------------------------------------------------->
		<script>		
		//删除附件
		function delatt(del_id)
		{
			document.getElementById("action").value="del_att";	
			document.getElementById("del_id").value=del_id; 
			document.getElementById("reload").value='<%=SCRIPT_NAME+"?page=Form&method="+method+"&d="+d%>'								
		}
		</script>
	      
		<%if(listAtt!=null && listAtt.Count>0){%> 
		<tr>
			<td align=center rowspan='2'>
				<p align="center">正文附件<input type=hidden name="del_id" id="del_id" value=""></p></td>
			<td colspan="24">
				<table width="100%" border="1" cellspacing="0" cellpadding="2">
					<tr class="tbsearch">									 
						<td align="center">
						<input name="hid_accessory_ids" type="hidden" id="hid_accessory_ids" value='<%=(map==null?"":map["accessory_ids"])%>'>
						<input name="hid_reload" type="hidden" id="hid_reload" value='<%=Request.Url%>'>
						附件名</td>
						<td align="center">操作</td>
					</tr>
					
					<%for(int ii=0;ii<listAtt.Count;ii++){%>
					<tr>									 
						<td>
							<%string t3_upload_name=Sys.encode(listAtt[ii]["doc_attname"].ToString()).Replace("%","%25").Replace("+","%2B").Replace("&","%26").Replace("\"","%22").Replace("<","%3C").Replace(">","%3E").Replace("\\","%5C").Replace("'","%27").Replace("?","%3F").Replace("=","%3D");
							string t3_upload_file=Sys.encode(listAtt[ii]["doc_attfile"].ToString()).Replace("%","%25").Replace("+","%2B").Replace("&","%26").Replace("\"","%22").Replace("<","%3C").Replace(">","%3E").Replace("\\","%5C").Replace("'","%27").Replace("?","%3F").Replace("=","%3D");
							%>
							<a href=..<%=AdminLib.EAP_PATH%>/popup2.aspx?page=download&title=<%=t3_upload_name%>&attach=<%=t3_upload_file%> style="FONT-SIZE: 10pt; FONT-FAMILY: 宋体;COLOR: blue">
								<%=listAtt[ii]["doc_attname"]%>
							</a>
						</td>

						<td>
							<%if(edit=="" && listAtt[ii]["upload_user"].ToString()==user["id"]){%>
							<input class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'"type="submit" value="删除"  onclick="return delatt('<%=listAtt[ii]["id"]%>')">
							<%}else{%>
							&nbsp;
							<%}%>					
						</td>
					</tr>
					<%}%>
				</table>
			</td>
		</tr>	
		<%}%>				
		<tr> 
			<%if((edit=="")){%>
			<%if(listAtt==null){%>
			<td align=center>
				<p align="center">正文附件</p></td>
			<%}%> 			 
			<td colspan="24">
				<select name="attach" style="width:394px" size="2" multiple></select>
				<input type="button" onClick="javascript:delete_list_item(attach,false);save_list_item(attach,add_attname,add_attfile);"value="删除" class="ButtonCss" onmouseover="this.className='ButtonCss_mouseover'" onmouseout="this.className='ButtonCss_mouseout'">
				</br>
				<select style="DISPLAY: none" name="add_attfile" multiple></select>
				<select style="DISPLAY: none" name="add_attname" multiple></select>
				<nolayer>
					<iframe name=_fileupload height=24 width=450px marginwidth=0 marginheight=0 scrolling=no frameborder=0 src='..<%=AdminLib.EAP_PATH%>/popup2.aspx?page=fileupload&dir=gwsz&prefix=firm'>
					</iframe>
				</nolayer>
				
				<SCRIPT language="JavaScript">
				<!--
					function fileUpload(text,value)
					{
					var newOption = new Option(text,value);
					var len= document.frmMain.attach.length;
					if(len>=20) alert("最多只能添加20个附件!");
					else document.frmMain.attach.options[len] = newOption;
					save_list_item(document.frmMain.attach,document.frmMain.add_attname,document.frmMain.add_attfile);
					}
				-->
				</SCRIPT>
			</td>
		</tr>
		<%}%>
		<!-------------------------------------------------附件操作------------------------------------------------->
						
						
		<tr style="display:none">
			<!--隐藏(hidden)-->
			<input type="hidden" id="action" name="action" value="">
			<input type=hidden id="reload" checked name="reload" value='<%=SCRIPT_NAME+"?page=Form&method=edit"%>' >
		</tr>
	      
		<tr>
			<script>
				//操作						
				function toEdit()
				{	
					document.getElementById("action").value="edit";								
					document.getElementById("reload").value='<%=SCRIPT_NAME+"?page=Form&method="+method+"&d={$id}"%>'
				}
			</script>
			<!--按钮-->
			<td colspan="43" align="center">
				<input type="submit" name="edit" class="ButtonCss" value="保存" title="保存操作" onclick="return toEdit();">
				<input type="button" class="ButtonCss" onClick="javscript:window.location.href='<%=SCRIPT_NAME+"?page=List&method="+method%>';" value="返 回" />
			</td>
		</tr>
	</tbody>
</table>
</form>
<%}%>

</body>
</html>